package com.repair.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.repair.domain.Rule;
import com.repair.service.Rule.RuleService;

public class GlobalValue {

	@SuppressWarnings("rawtypes")
	private Map juesemap;
	private static GlobalValue instance;

	private GlobalValue() {
		RuleService f = new RuleService();
		List<Rule> rule = new ArrayList<Rule>();
		rule = f.list();
		juesemap = new HashMap();
		for (Rule item : rule) {
			juesemap.put(item.getRuleid(), item.getRulename());
		}

	}

	public static GlobalValue getinstance() {
		if (instance == null) {
			instance =new GlobalValue();
		}
		return instance;
			
	}

	@SuppressWarnings("rawtypes")
	public Map getJuesemap() {
		return juesemap;
	}

}
